﻿
@{
    ViewBag.title = "添加管理员";
}
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>@ViewBag.title</h5>
            <div class="ibox-tools">
            </div>
        </div>
        <div class="ibox-content">
            @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "addAdminForm", @class = "form-horizontal m-t" }))
            {
                                        <div class="alert alert-info">
                            您可以修改密码，请务必设置一个比较复杂的密码，以免被爆破！<br />
                            密码要求：<span class="text-danger">@ViewBag.passwordTip</span>
                        </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">所属管理组：</label>
                    <div class="col-sm-8">
                        <select class="form-control m-b" name="RoleId" id="RoleId">
                            @foreach (var m in ViewBag.RoleList)
                            {
                                <option value="@m.Id">@m.RoleName</option>
                            }
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">用户名：</label>
                    <div class="col-sm-8">
                        <input id="UserName" name="UserName" maxlength="20" type="text" class="form-control" required aria-required="true" placeholder="填写管理员登录用户名"  autocomplete="off">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">姓名：</label>
                    <div class="col-sm-8">
                        <input id="RealName" name="RealName" maxlength="20" type="text" class="form-control" placeholder="可以填写备注管理员的姓名，非必填">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">登录密码：</label>
                    <div class="col-sm-8">
                        <input id="PassWord" name="PassWord" maxlength="20" type="password" class="form-control" placeholder="填写管理员登录密码" required  autocomplete="off">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">重复密码：</label>
                    <div class="col-sm-8">
                        <input id="PassWord2" type="password" class="form-control" name="PassWord2" maxlength="20" placeholder="请重复填写一次登录密码" aria-required="true" required  autocomplete="off">
                    </div>
                </div>

                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-3">
                        <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 提交 </button>
                        <button class="btn btn-default" type="button" onclick="closethisdialog();"><i class="fa fa-close"></i> 取消 </button>
                    </div>
                </div>
            }
        </div>
    </div>


</div>
<script>
    $(function () {
        DoPost("addAdminForm");
    })
</script>